package com.wz.service.impl;

import com.wz.entity.Emp;
import com.wz.entity.User;
import com.wz.mapper.UserMapper;
import com.wz.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {


    @Autowired
    private UserMapper userMapper;


    @Override
    public User getUser(String username, String password) {
        return userMapper.findUser(username,password);
    }

    @Override
    public int save(User user) {
        return userMapper.saveUser(user);
    }

    @Override
    public List<User> findUsers() {
        return userMapper.findUsers();
    }

    @Override
    public Integer delete(String id) {
        return userMapper.deleteUser(id);
    }


}

